package net.qiqb.core.domain.definition;

import java.util.HashMap;
import java.util.Map;

public class DomainDefineRegistrar {

    /**
     * key：聚合根名称#拓展的名称
     */
    private final Map<String, DomainDefine> domainDefineMap = new HashMap<>();


    public boolean register(DomainDefine domainDefine) {
        final String name = domainDefine.getName();
        domainDefineMap.put(name, domainDefine);
        return false;
    }

    public DomainDefine getByAggregateName(String aggregateName) {
        return domainDefineMap.get(aggregateName);
    }
}
